#!/usr/bin/env python
# coding: utf-8
from matplotlib.pyplot import *

fin=open('counts.dat')
todo=fin.read().split('\n')
xs=[int(x.split()[0]) for x in todo if x]
ys=[int(x.split()[1]) for x in todo if x]
title("Cantidad de operaciones de $matching$")
xlabel("Tamano de entrada")
ylabel("Cantidad de operaciones")
plot(xs,ys,'kx',label="__nolabel__")
plot(xs,[x*5.5+60 for x in xs],label=r"$c \times x$")
legend(loc=0)
savefig('ej1_counts.png',dpi=640./8)
show()
